Recording apparatus

ABSTRACT

A recording apparatus for recording a moving image file including a first area to store moving image data and a second area to store meta data constructed by one or more tracks into a recording medium generates a first track, stores first position information into the first track and stores the first track into the second area to be recorded into the recording medium, generates a second track when a size of moving image file reaches a threshold value, generates second position information which can represent a larger value than the first position information, stores the second position information into the second track, stores the first and second tracks into the second area to be recorded into the recording medium.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a recording apparatus and, more particularly, to a recording apparatus for recording data based on a different file system so that recorded data can be reproduced.

2. Description of the Related Art

Hitherto, an MP4 file format has been known as a file format for recording a moving image signal and an audio signal into a recording medium (refer to the Official Gazette of Japanese Patent Application Laid-Open No. 2006-074531). According to the MP4 format, besides an area for storing the encoded moving image signal and audio signal, an area for storing meta data including position information and the like necessary to reproduce and decode a moving image and an audio sound is provided.

In a file system in the related art such as FAT32 or the like for managing files, a file size is represented with a value of 32 bits. By using the 32-bit value, a file whose size is up to 4 Gigabytes (GB) can be represented.

In recent years, a file system which can represent the file size with a value of 64 bits has been proposed. Therefore, even in a moving image file such as an MP4 file or the like, it is necessary to expand the file size so that a size exceeding 4 GB, which can be represented with a 64-bit value, can be handled.

However, in a reproducing apparatus which can reproduce the moving image file of up to 4 GB in the related art, a moving image file of a size exceeding 4 GB cannot be handled. Therefore, in the case where the moving image file is recorded in a format of the expanded file size, there is such a problem that the recorded moving image file cannot be reproduced by the reproducing apparatus in the related art.

SUMMARY OF THE INVENTION

In view of the above-described problem, it is an aspect of the invention to provide a recording apparatus for recording a moving image file recorded in a format of an expanded file size so that the recorded moving image file can be reproduced.

In order to accomplish the above object, according to the invention, a recording apparatus comprises: a recording unit configured to record a moving image file including a first area for storing moving image data and a second area for storing meta data constructed by one or more tracks into a recording medium; a generating unit configured to generate position information regarding a position of the moving image data in the first area; and a control unit configured to generate a first track and control the generating unit and the recording unit so as to generate first position information, store the first position information into the first track and store the first track into the second area to record the first track into a recording medium, wherein the control unit generates a second track when a size of the moving image file reaches a threshold value, and the control unit further controls the generating unit so as to generate second position information which can represent a larger value than the first position information with respect to the position of the moving image data in the first area, and also controls the recording unit so as store the second position information into the second track and store the first and second tracks into the second area to record the moving image file into the recording medium.

Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an example of a construction of a recording apparatus according to an embodiment of the invention.

FIG. 2 is a diagram illustrating an example of a file format which is handled in the embodiment of the invention.

FIG. 3 is a diagram illustrating a construction of an MP4 file.

FIG. 4 is a diagram illustrating a construction of position information in an MP4 file format.

FIG. 5 is a diagram illustrating a flowchart for a recording processing according to the first embodiment of the invention.

FIG. 6 is a diagram illustrating a flowchart for a recording processing according to the second embodiment of the invention.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the invention will be described hereinbelow with reference to the drawings.

First Embodiment

FIG. 1 is a block diagram illustrating an example of a construction of a recording apparatus according to an embodiment of the invention.

In FIG. 1, an input unit 101 obtains moving image data and audio data and outputs them. The input unit 101 inputs the moving image data and audio data supplied from an outside of a data processing apparatus 100 in the present embodiment. However, the input unit 101 may be constructed so as to include an image pickup unit and a microphone to obtain the moving image photographed by the image pickup unit and the audio data collectively picked up by the microphone.

Upon recording, a signal processing unit 102 encodes the moving image data and audio data which are input by the input unit 101, in accordance with a well-known encoding format such as H.264(MPEG4 AVC) or the like to compress an information amount. The signal processing unit 102 also executes a processing necessary for recording the moving image data and audio data. Upon reproduction, the signal processing unit 102 decodes the reproduced moving image data and audio data to expand an information amount thereof. Upon recording, the signal processing unit 102 outputs information of a code amount (data amount) of the encoded moving image data and audio data to a control unit 106.

A memory 103 stores the moving image data and audio data. Each block of the data processing apparatus 100 accesses the memory 103, thereby processing the necessary moving image data and audio data. Besides the moving image data and audio data, the memory 103 stores various kinds of information such as information of a file system, management information of a moving image file, and the like and further plays a role of a work memory or the like for control by the control unit 106.

Upon recording, a media data management unit 104 generates various kinds of information specified by the MP4 file as will be described hereinafter. Upon reproduction, the media data management unit 104 processes the reproduced management information and informs the control unit 106 of its contents. A display unit 105 displays the moving image which is input or the reproduced moving image or various kinds of information such as menu information and the like.

The control unit 106 controls the whole operation of the data processing apparatus 100 in accordance with an input from an operation input unit 107. The control unit 106 includes a microcomputer, a memory, and the like and controls the data processing apparatus 100 in accordance with a program stored in a ROM (not shown). The operation input unit 107 includes various kinds of switches which can be operated by the user, receives various kinds of instructions from the user, and notifies the control unit 106 of them. The operation input unit 107 also includes a power switch, switches for instructing start and stop of the recording, a switch for changing over a mode of the data processing apparatus 100, and the like.

A recording and reproducing unit 108 records the moving image data and audio data or various kinds of information into a recording medium 109 and reproduces those data from the recording medium 109. Upon recording, the recording and reproducing unit 108 records the management information and the moving image data or audio data stored in the memory 103 into the recording medium 109 by a file format as will be described hereinafter. Upon reproduction, the recording and reproducing unit 108 reproduces the management information and the moving image data or audio data of the moving image file from the recording medium 109 and stores them into the memory 103. In the present embodiment, the recording medium 109 is a random-access recording medium such as hard disk (HDD), flash memory card, or the like.

The recording and reproducing unit 108 manages the moving image file and various kinds of information which are recorded into the recording medium 109, as a file in accordance with a file system such as FAT (File Allocation Table) or the like. In the present embodiment, a file system which can represent the file size with 64 bits is used. Therefore, the maximum file size which can be handled by the recording apparatus of the present embodiment is equal to 2**64 (2 to the power of sixty-four) bytes. Although the recording apparatus is constructed in such a manner that the recording medium 109 can be easily loaded and unloaded into/from the data processing apparatus 100 by a loading/unloading mechanism (not shown), the data processing apparatus 100 may be arranged to have a built-in recording medium 109.

In the case of writing and reading out the moving image file into/from the recording medium 109, the control unit 106 controls the recording and reproducing unit 108 so as to reproduce file system data (management data) from the recording medium 109 and store into the memory 103. The file system data is data showing a file name of the data recorded in the recording medium 109, a file size, a recording address of the data, and the like and thus is the management information to manage the file. The control unit 106 controls the writing and read-out of the file in accordance with the read-out file system data. In accordance with the file being written into the recording medium 109, the control unit 106 updates the file system data stored in the memory 103 and records the updated file system data into the recording medium 109 by the recording and reproducing unit 108.

An output unit 110 outputs the reproduced moving image data and audio data to an external apparatus.

Subsequently, an information file which is handled in the present embodiment will be described. FIG. 2 illustrates a construction of a moving image file which is handled in the present embodiment. The moving image file 201 includes a first area 202 for storing information data such as moving image data, audio data, and the like. The moving image file 201 also includes a second area 203 into which meta data including position information regarding the positions of the moving image data and audio data stored in the first area 202 is stored. A size of the moving image data, audio data and the meta data stored in the respective areas increases in accordance with recording time. Each information which is stored in the meta data is information regarding the moving image data and audio data. Therefore, after the moving image data and audio data are recorded, the contents thereof are fixed.

A construction of a moving image file 204 in the case where two tracks are included is illustrated in FIG. 2. The meta data is stored into a track 1 and a track 2. Meta data 205 and 206 corresponding to those tracks are stored into the second area 203. Position information stored in the meta data 205 in the track 1 indicates the former half portion of the media data stored in the first area. Position information stored in the meta data 206 in the track 2 indicates the latter half portion of the media data.

As a format for recording the moving image data in such a file format, an MP4 file format has been known. In the present embodiment, the moving image file is recorded in accordance with the MP4 file format. In the MP4 file, the first area corresponds to an mdat box and the second area corresponds to an moon area.

The MP4 file is constructed by a unit which is called a “box”. One box includes areas of box-size, box-type, and box-data. Information of a data length (size) of this box is stored into box-size. Information showing a type of data which is stored into box-data is stored into box-type. Real data is stored into box-data. The box-type is a 32-bit data area of a fixed length. The box-data is an area of a variable length. Since the box-size is generally equal to 32 bits, a size of one box is generally equal to or less than 0xFFFFFFFF bytes. Therefore, as will be described hereinafter, when a size of moving image stored in the mdat box exceeds 4 GB, the box-size in the mdat box is recorded as 64-bit data.

FIG. 3 illustrates an example of a construction of each of moving image files 301 and 303 of the MP4 file format which is handled in the embodiment. Each of the moving image files 301 and 303 is constructed by three boxes of FileTypeBox(ftyp), MediaDataBox(mdat), and MovieBox(moov). Each box of ftyp, mdat, and moov is a highest layer.

The ftyp is a box in which the box-type is ftyp and information regarding file compatibility is stored. On the basis of box-data described in the ftyp, an encoding system or the like of the moving image data and audio data stored in the MP4 file can be discriminated.

The mdat is a box in which the box-type is mdat and each sample of the moving image data and audio data is stored. Each of the encoded moving image data and audio data is divided into units each of which is called a “chunk” to be stored. In the present embodiment, it is assumed that one chunk of the moving image data is the moving image data of 1GOP specified by the H.264 system. It is also assumed that one chunk of the audio data is the audio data of the number of frames corresponding to 1GOP.

The moov is a box in which the box-type is moov and the meta data regarding the moving image data and audio data is stored. Information such as chunk offset showing an offset from a file head of each chunk of the moving image data and audio data, the number of samples of each chunk, sample size, and the like is stored in box-data of moov. The moov includes mvhd and one or more trak. A trak box is information which defines one or more video tracks and video/audio tracks. The trak includes tkhd and mdia. The mdia is information describing a media type and the like of each track. The mdia includes mdhd and stbl. Information such as chunk offset showing an offset from the file head of each chunk of the moving image data and audio data, the number of samples of each chunk, display time of the sample, sample size, and the like is stored in the stbl. One sample of the moving image data corresponds to a frame and one sample of the audio data corresponds to an audio frame. Each of stco and co64 is a box to store information showing a position (offset position) from the file head of each chunk of the moving image data and audio data stored in the mdat. Those position information is information necessary to reproduce the moving image data and audio data stored in the moving image file. The co64 is a box in which the position information which can represent the position information of 64 bits can be stored.

The stco box is stored as position information into the moving image file 301. The stco box indicates the position of the moving image data in the range 302 of the track 1 in the mdat. The stco box is stored as position information into the track 1 of the moving image file 303 and the co64 box is stored as position information into the track 2. In this case, the stco box indicates the position of the moving image data in a range 304 of up to 4 GB from the head. The co64 box indicates the position of the moving image data in a range 305 exceeding 4 GB.

Data which is stored in each of the stco box and the co64 box is shown in FIG. 4. Reference numeral 401 denotes a stco box. A box size indicates a size of the whole box. The stco is stored as a box type. A version indicates a version of the box and “0” is ordinarily stored there. Although a flag is used in another box type, since it is not used here, “0” is stored there. The number of entries indicates the number of next elements “offsets”. A value showing the position from the file head of each chunk of the moving image data and audio data which are stored in the mdat is stored in an offset. One entry indicates an offset of one chunk. In the case of reproducing, by referring to the offset, the position in the file where the moving image data as a reproduction target exists can be known. The offset which is stored in the stco box is data of 4 bytes (32 bits). Therefore, in the stco, if the size of moving image file is up to 4 GB, the offset value of each chunk can be shown.

Reference numeral 402 denotes a co64 box. The co64 box 402 is substantially the same as the stco except for the last offset. The offset which is stored in the co64 box is data of 8 bytes (64 bits). Therefore, in the co64 box, a value larger than that of the stco box can be represented as an offset value of each chunk. Thus, in the co64, even if the size of moving image file exceeds 4 GB, the offset value of each chunk can be represented.

Subsequently, a recording processing of a moving image will be described.

In the embodiment, when the file size does not exceed 4 GB, like a moving image file 301, a moving image file including one track (first track) is recorded into the recording medium. When the file size exceeds 4 GB, at a point of time when the file size reaches 4 GB, a second track is generated. The moving image file 303 including two tracks is recorded into the recording medium. That is, according to the present embodiment, such a reproduction that the box co64 and the box stco are selectively used in accordance with a moving image data length and the position information stored in stco in the moving image data according to the 64-bit file system is used is enabled.

FIG. 5 illustrates a flowchart for the recording processing according to the embodiment. Processings of FIG. 5 are executed in such a manner that the control unit 106 controls each unit. In a recording standby state, when a recording start instruction is received from the operation input unit 107, the control unit 106 newly generates a moving image file. Then, a track 1 is generated (S501). The encoding of the moving image and audio is started (S502). The encoded moving image data and audio data are sequentially stored into the memory 103. In association with the encoding processing of the moving image and audio, the control unit 106 stores the information such as a generated code amount and the like from the signal processing unit 102 into the memory 103. In this manner, the encoded moving image data and audio data which are not recorded yet are sequentially stored into the memory 103. When the code amount of each of the unrecorded moving image data and audio data stored in the memory 103 reaches a predetermined value, the control unit 106 determines that timing for writing into the recording medium 109 has come (S503). The control unit 106 instructs the recording and reproducing unit 108 to record the moving image data and audio data stored in the memory 103 (S504). In response to such an instruction, the recording and reproducing unit 108 sequentially stores the moving image data and audio data into the mdat box shown in FIG. 3 to record the moving image file into the recording medium 109.

When the writing of the moving image data and audio data to be written is completed in the writing processing of one time, the control unit 106 discriminates whether or not the size of moving image file which is being recorded at present has, exceeded a preset threshold value (S505). In the present embodiment, the threshold value is assumed to be 4 GB. Specifically speaking, the control unit 106 discriminates whether or not the sum of the moving image data and audio data which are stored into the mdat box and the meta data which is stored into the moon box exceeds 4 GB. This is because the maximum value which can be represented by 32 bits is equal to 2**32 bytes. A similar recording processing can be also executed by setting another value smaller than 4 GB as a threshold value.

When the file size does not reach the threshold value as a result of the discrimination, the control unit 106 instructs the media data management unit 104 to generate the position information (first position information) which represents the position of each chunk of the data which is recorded just before, with the 32-bit data (S506). This first position information is recorded as offset data in the stco box. The media data management unit 104 detects the position (the number of bytes) from the file head of each chunk on the basis of the information such as a generated code amount and the like stored in the memory 103. On the basis of the detected position information, the media data management unit 104 generates the first position information to be stored in the memory 103. In the present embodiment, since a size of meta data including the position information is relatively small, this data is temporarily stored in the memory 103, and after the recording stop instruction is received, the stored data are recorded in a lump.

If the file size exceeds the threshold value in S505, the positions of the moving image data and audio data cannot be represented with 32 bits. Therefore, if the file size exceeds the threshold value during the writing of the moving image data of the present time, the control unit 106 does not generate the first position information and newly generates a track 2. Specifically speaking, the control unit 106 discriminates whether or not the present track is the track 1 (S512). If the present track is the track 1, the control unit 106 newly generates the track 2 (S513).

The control unit 106 instructs the media data management unit 104 so as to decide the chunk which is recorded just before the size exceeds 4 GB, as a head chunk of the track 2 and generate the position information (second position information) which represents that the position with the 64-bit data (S514). If the head of the chunk is not included in the data which is written just before, a chunk recorded just before, from among the data which have already been recorded, is detected and this chunk is set to the head chunk of the track 2. The second position information is recorded as offset data in the co64 box. If the present truck is the track 2 in S512, the control unit 106 instructs the media data management unit 104 to generate the second position information.

The control unit 106 discriminates whether or not there is a recording stop instruction from the operation input unit 107 (S507). If there is not a recording stop instruction, the recording is continued as it is. If there is a recording stop instruction, the control unit 106 stops the encoding of the moving image and audio signal, which is executed by the signal processing unit 102. The control unit 106 instructs the recording and reproducing unit 108 to write the unrecorded moving image data and audio data stored in the memory 103 (S508). Subsequently, the control unit 106 discriminates whether or not the size of moving image which is being recorded at present, exceeds the predetermined threshold value (S509). If the file size does not reach the threshold value, the control unit 106 instructs the media data management unit 104 to generate the first position information showing the position of each chunk of the data which has been recorded just before (S510).

The media data management unit 104 also generates each meta data defined in the MP4 file format. The control unit 106 instructs the recording and reproducing unit 108 to store the meta data into the moov box to be recorded (S511). At this time, since the file size does not exceed the threshold value, only the data of the track 1 is recorded into the moov.

If the file size exceeds the threshold value in S509, the control unit 106 discriminates whether or not the present track is the track 1 (S515). If the present track is the track 1, the control unit 106 newly generates the track 2 (S516) and instructs the media data management unit 104 to generate the second position information (S517). If the present track is the track 2 in S515, the control unit 106 instructs the media data management unit 104 to generate the second position information.

The media data management unit 104 also generates each meta data defined in the MP4 file format (S517). The control unit 106 instructs the recording and reproducing unit 108 to store the meta data into the moov box to be recorded (S511). At this time, since the file size exceeds the threshold value, the data of the track 1 and the data of the track 2 are stored into the moov.

As mentioned above, in the present embodiment, when the size of moving image file exceeds the threshold value after the recording is started, the track 2 is newly generated. The position information (second position information) of the portion of the moving image data, the size of which portion exceeds the threshold value is stored into the track 2 to be recorded.

Subsequently, the operation at the time of reproducing the moving image file in which the tracks 1 and 2 have been recorded in the box moov as mentioned above will be described. When there is a reproducing instruction of the moving image file from the operation input unit 107, the control unit 106 instructs each unit to read out the designated moving image file to reproduce it. The recording and reproducing unit 108 reads out the designated moving image file from the recording medium 109 to store into the memory 103. Since the sizes of the moving image data and audio data are very large, all of them cannot be stored into the memory 103 in a lump. Therefore, the recording and reproducing unit 108 sequentially reads out the necessary portions from the recording medium 109 to store into the memory 103. In order to sequentially read out the necessary portions, it is necessary to know the positions in the file where desired moving image data and audio data exist, by using the position information stored in the stco box and the co64 box.

For this purpose, the control unit 106 first designates the data in the moov box and instructs the recording and reproducing unit 108 to read out it. The recording and reproducing unit 108 reads out the data in the moov box from the recording medium 109 to store into the memory 103. The media data management unit 104 analyzes the moov stored in the memory 103 and grasps the positions so that it can access each box of the moving image file. In order to know the positions of the moving image data and audio data to be subsequently read out, the media data management unit 104 obtains the information in the stco box or the co64 box. Ordinarily, the data is subsequently analyzed from the head of the file. Therefore, in the moving image file in FIG. 3, the stco box in the trak1 in the moov is referred to first.

On the basis of the position information in the stco box, the position of each chunk of the moving image and audio in the mdat is detected. On the basis of the position of each chunk, the control unit 106 designates the data of the necessary chunk and instructs the recording and reproducing unit 108 to read out it. The recording and reproducing unit 108 reads out the data at the designated position to store into the memory 103. The moving image data and audio data stored in the memory 103 are subsequently decoded by the signal processing unit 102.

After all of the chunk data at the positions designated by the stco in the track 1 is read out, the data in the track 2 is analyzed by the media data management unit 104. On the basis of the position information in the co64 box in the track 2, the position of each chunk of the moving image and audio data in the mdat is detected. The control unit 106 designates the data of the necessary chunk on the basis of the position of each chunk and instructs the recording and reproducing unit 108 to subsequently read out the chunk data.

A case where the moving image file recorded as mentioned above is reproduced by an apparatus which cannot reproduce the moving image file of the size exceeding 4 GB will now be described. In such a reproducing apparatus, when the data in the track 2 is analyzed, since the co64 box is a box which cannot be recognized, this box is ignored upon reproduction. Therefore, the moving image data and audio data of the portions designated by the co64 box in the track 2 are not reproduced and the reproduction is finished at a point of time when the reproduction of the moving image and audio data designated by the stco on the track 1 is completed.

As mentioned above, in the present embodiment, when the size of the moving image file exceeds 4 GB, the track 2 is newly generated and the co64 box which can represent a value exceeding 4 GB is recorded. Therefore, even the reproducing apparatus which cannot recognize the co64 box in the track 2, can normally reproduce the moving image file by referring to the stco box in the track 1, with respect to the portions of up to 4 GB.

Therefore, according to the recording apparatus of the invention, when the moving image is recorded in the file format expanded so as to cope with the file system which represents the file size with 64 bits, even the apparatus which copes with only 32 bits, can reproduce a part of such a file.

Although the moving image and audio have been recorded in the MP4 file format in the embodiment, they can be also recorded in another file format such as QuickTime (registered trademark).

Modification of the First Embodiment

Subsequently, a modification of the first embodiment will be described. FIG. 6 is a flowchart illustrating the recording operation according to the modification. Since processings of FIG. 6 are substantially the same as those of FIG. 5, portions different from FIG. 5 will be described. That is, a point that the processing for generating the track 2 is executed at a point of time when the data amount of the moving image file exceeds the threshold value is similar to that of the first embodiment. However, the threshold value to be used is set as such a value that has some implications which are not in the first embodiment. The processing after the comparison discrimination between the threshold value and the data amount is a processing in which those implications are reflected.

After the moving image data and audio data stored in the memory 103 are written into the recording medium in S504, the control unit 106 discriminates whether or not the size of moving image file which is being recorded exceeds a predetermined threshold value 2 (S601). In this instance, the threshold value 2 in the present modification is a value smaller than 4 GB and is set as such a value, based on which it is predicted that the data amount of the moving image data will reach 4 GB, in the case where the moving image data and audio data were written in the writing processing (S504 or S508) of the next time. For example, the threshold value 2 can be decided in consideration of the amount of data which is recorded in response to one writing instruction from the control unit 106 in S504. Therefore, in the present modification, at a point of time when the data amount of the moving image exceeds the threshold value 2, the track 2 is generated to continue to execute the recording processing. The generation of the position information (second position information) to be stored into the track 2 is executed so long as it is determined that the present track is the track 2.

When the file size exceeds the threshold value, the control unit 106 discriminates whether or not the present track is the track 1 (S512). If the present track is the track 1, the control unit 106 instructs the media data management unit 104 to generate the first position information as position information of the moving image data and audio data which were written just before (S603). Then, the control unit 106 newly generates the track 2 (S513). If the present track is the track 2 in S512, the control unit 106 instructs the media data management unit 104 to generate the second position information (S514).

When there is a recording stop instruction in S507, the control unit 106 stops the encoding of the moving image and audio signal, which is executed by the signal processing unit 102. The control unit 106 instructs the recording and reproducing unit 108 to write the unrecorded moving image data and audio data stored in the memory 103 (S508). Subsequently, the control unit 106 discriminates whether or not the size of moving image which is being recorded at present exceeds the threshold value 2 (S602). If the file size does not reach the threshold value 2, the control unit 106 instructs the media data management unit 104 to generate the first position information showing the position of each chunk of the data which was recorded just before (S510).

If the file size exceeds the threshold value 2 in S602, the control unit 106 discriminates whether or not the present track is the track 1 (S515). If the present track is the track 1, the control unit 106 instructs the media data management unit 104 to generate the first position information. If the present track is the track 2, the control unit 106 instructs the media data management unit 104 to generate the second position information (S516).

Also with the construction of the present modification, similarly to the first embodiment, even the reproducing apparatus which cannot recognize the co64 box of the track 2, can normally reproduce the moving image file by referring to the stco box on the track 1, with respect to the data portions of up to 4 GB. Therefore, when the moving image is recorded in the file format corresponding to the file system which represents the file size by 64 bits, the recording apparatus of the modification can record the moving image file so that the apparatus which copes with only 32 bits can reproduce a part the recorded moving image file.

The threshold value 2 to be used in the comparison discrimination in S602 in FIG. 6 can be also set to 4 GB as in the first embodiment. A case where the data amount does not exceed 4 GB in accordance with the implications in the comparison discrimination in S601 is also considered in dependence on an amount of data which is written by the recording stop instruction just after the track 2 is generated. In such a case, even if the track 2 is generated in S603, the recording can be performed only by the generation of the first position information.

Other Examples

Aspects of the present invention can also be realized by a computer of a system or apparatus (or devices such as a CPU or MPU) that reads out and executes a program recorded on a memory device to perform the functions of the above-described embodiment(s), and by a method, the steps of which are performed by a computer of a system or apparatus by, for example, reading out and executing a program recorded on a memory device to perform the functions of the above-described embodiment(s). For this purpose, the program is provided to the computer for example via a network or from a recording medium of various types serving as the memory device (e.g., computer-readable medium).

While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application Laid-Open No. 2011-273505 filed on Dec. 14, 2011, which is hereby incorporated by reference herein in its entirety. 

What is claimed is:
 1. A recording apparatus comprising: a recording unit configured to record a moving image file including a first area for storing moving image data and a second area for storing meta data constructed by one or more tracks into a recording medium; a generating unit configured to generate position information regarding a position of the moving image data in the first area; and a control unit configured to generate a first track, control the generating unit and the recording unit so as to generate first position information, store the first position information into the first track and store the first track into the second area to record the first track as the moving image file into the recording medium, wherein the control unit generates a second track when a size of the moving image file has reached a preset threshold value, and the control unit further controls the generating unit so as to generate second position information which can represent a larger value than the first position information with respect to the position of the moving image data in the first area, and also controls the recording unit so as to store the second position information into the second track and store the first and second tracks into the second area to record the moving image file into the recording medium.
 2. An apparatus according to claim 1, wherein the first position information is information regarding the position of the moving image data stored in the first area until the size of the moving image file reaches the threshold value, and the second position information is information regarding the position of the moving image data stored in the first area after the size of the moving image file reaches the threshold value.
 3. An apparatus according to claim 1, wherein the control unit discriminates whether or not the size of the moving image file reaches the threshold value in the case where the recording unit records the first area into the recording medium as the moving image file, and after it is determined that the size of the moving image file reaches the threshold value, the control unit controls the generating unit so as to generate the second position information and not to generate the first position information.
 4. An apparatus according to claim 1, further comprising an instructing unit configured to instruct the start and stop of recording the moving image file into the recording medium, and wherein the control unit generates the first track in accordance with an instruction to start the recording by the instructing unit and controls the recording unit in accordance with an instruction to stop the recording so as to record the first position information and the second position information into the recording medium.
 5. An apparatus according to claim 1, wherein the threshold value is set on the basis of a maximum value of values which can represent the first position information.
 6. A recording method of a moving image file in a recording apparatus having a recording unit configured to record the moving image file including a first area for storing moving image data and a second area for storing meta data constructed by one or more tracks into a recording medium and a generating unit configured to generate position information regarding a position of the moving image data in the first area, comprising: a control step of generating a first track, controlling the generating unit and the recording unit so as to generate first position information, store the first position information into the first track and store the first track into the second area to record the first track as the moving image file into the recording medium, wherein the control step includes generating a second track when a size of the moving image file reaches a preset threshold value, and the control step further includes controlling the generating unit so as to generate second position information which can represent a larger value than the first position information with respect to the position of the moving image data in the first area, and the recording unit is also controlled so as to store the second position information onto the second track and store the first and second tracks into the second area to record the moving image file into the recording medium.
 7. A non-transitory computer-readable storage medium storing a program comprising codes for causing a computer to execute the control method according to claim
 6. 8. A recording apparatus comprising: a recording unit configured to store moving image data and audio data into an information file of MP4 file format and record the information file on a recording medium; a generation unit configured to generate a first trak box, a second trak box, a stco box and a co64 box during recording of the information file, a control unit configured to control the recording unit to store the first trak box and the second trak box into a moon box of the information file recorded on the recording medium, wherein the control unit controls the recording unit to store the stco box into the first trak box of the information file and store the co64 box into the second trak of the information file.
 9. An apparatus according to claim 8, wherein the generation unit generates the stco box indicating chunk offsets of predetermined chunks of moving image data and audio data stored in the information file and the co64 box indicating chunk offsets of the predetermined chunks and chunks other than the predetermined chunks.
 10. An apparatus according to claim 9, wherein the predetermined chunks correspond to the moving image data and the audio data recorded before a size of the information file reaches a threshold, and the other chunks correspond to the moving image data and the audio data recorded after the size of the information file reaches the threshold.
 11. An apparatus according to claim 10, wherein the threshold is 4 gigabytes.
 12. An apparatus according to claim 8, wherein the generation unit generates the first trak box in accordance with a start of recording the information file and generates the second trak box in accordance with a size of the information file reaching a threshold.
 13. An apparatus according to claim 12, wherein the generation unit generates the stco box in accordance with the start of recording the information file and generates the co64 box in accordance with the size of the information file reaching the threshold.
 14. A control method of a recording apparatus including a recording unit configured to store moving image data and audio data into an information file of MP4 file format and record the information file on a recording medium, comprising: generating a first trak box, a second trak box, a stco box and a co64 box during recording of the information file by the recording unit, a controlling the recording unit to store the first trak box and the second trak box into a moon box of the information file recorded on the recording medium, wherein the controlling step controls the recording unit to store the stco box into the first trak box of the information file and store the co64 box into the second trak of the information file.
 15. A non-transitory computer-readable storage medium storing a program comprising codes for causing a computer to execute the control method according to claim
 14. 